package client;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.Frame;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JLabel;
import javax.swing.JTextField;

public class FindPasswordGUI extends JDialog {

	private final JPanel contentPanel = new JPanel();
	private JTextField textField_ID;
	private JTextField textField_question;
	private JTextField textField_answer;

	/**
	 * Launch the application.
	 */
	/*public static void main(String[] args) {
		try {
			FindPasswordGUI dialog = new FindPasswordGUI();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}*/

	/**
	 * Create the dialog.
	 */
	public FindPasswordGUI(Frame hostFrame,String title,boolean dModal) {
		super(hostFrame,title,dModal);
		setBounds(100, 100, 450, 300);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);
		{
			JLabel label = new JLabel("\u7528\u6237\u540D\uFF1A");
			label.setBounds(52, 53, 54, 15);
			contentPanel.add(label);
		}
		{
			JLabel label = new JLabel("\u5BC6\u7801\u63D0\u793A\u95EE\u9898\uFF1A");
			label.setBounds(52, 100, 90, 15);
			contentPanel.add(label);
		}
		{
			JLabel lblNewLabel = new JLabel("\u95EE\u9898\u7B54\u6848\uFF1A");
			lblNewLabel.setBounds(52, 146, 78, 15);
			contentPanel.add(lblNewLabel);
		}
		{
			textField_ID = new JTextField();
			textField_ID.setBounds(166, 50, 66, 21);
			contentPanel.add(textField_ID);
			textField_ID.setColumns(10);
		}
		{
			textField_question = new JTextField();
			textField_question.setBounds(166, 97, 66, 21);
			contentPanel.add(textField_question);
			textField_question.setColumns(10);
		}
		{
			textField_answer = new JTextField();
			textField_answer.setBounds(166, 143, 66, 21);
			contentPanel.add(textField_answer);
			textField_answer.setColumns(10);
		}
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("OK");
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
			{
				JButton cancelButton = new JButton("Cancel");
				cancelButton.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						dispose();
					}
				});
				cancelButton.setActionCommand("Cancel");
				buttonPane.add(cancelButton);
			}
		}
	}

}
